import request from '@/utils/request'

/**
 * 图片上传
 * @param data
 */
export function fileImageApi(data, params) {
  return request({
    url: '/amz/upload/image',
    method: 'POST',
    params,
    data
  })
}

/**
 * 上传网络图片-提交
 * @param pram
 */
export function uploadNetworkPictures_submit(formData) {
  return request({
    url: '/amz/upload/uploadNetworkPictures',
    method: 'post',
    data: formData
  })
}

/**
 * 查询产品图片列表 qckj
 * @param tableData
 */
export function listProductImage(tableData) {
  return request({
    url: '/amz/productImage/listProductImage',
    method: 'post',
    data: tableData
  })
}

/**
 * 图片列表
 * @param data
 */
export function fileListApi(params) {
  return request({
    url: '/amz/productImage/list',
    method: 'get',
    params
  })
}


/**
 * 图片列表 删除图片
 * @param data
 */
export function fileDeleteApi(id) {
  return request({
    url: `/amz/productImage/delete/${id}`,
    method: 'get'
  })
}

/**
 * 图片列表 移动分类
 * @param data
 */
export function attachmentMoveApi(data) {
  return request({
    url: `/amz/productImage/move`,
    method: 'post',
    params: data
  })
}
